<template>
  <div id="app">
    <div class="nav">
      <router-link
        v-for="(value, key) in compList" :key="value[0]"
        :to="value[1]"
      >{{key}}</router-link>
    </div>
    <div class="content">
      <router-view/>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Display',
  data () {
    return {
      compList: {
        Banner: ['comp1', '/banner'],
        Editor: ['comp2', '/editor'],
        Time: ['comp3', '/time'],
        Tree: ['comp4', '/tree'],
        Pencil: ['comp5', '/pencil'],
        Palette: ['comp6', '/palette'],
        Charts: ['comp7', '/charts'],
        Player: ['comp8', '/player'],
        AudioPlayer: ['comp9', '/audioPlayer'],
        WaterMark: ['comp10', '/waterMark']
      }
    }
  }
}
</script>

<style lang="less" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  .nav {
    padding: 30px;
    a {
      font-weight: bold;
      color: #2c3e50;
      margin-left: 15px;
      text-decoration: none;
      &.router-link-exact-active {
        color: #42b983;
        padding: 0 3px;
        border: 1px solid #42b983;
        border-radius: 5px;
        box-shadow: 2px 2px 5px rgba(66, 185, 131, 0.7);
      }
    }
  }
  .content{
    width: 1200px;
    height: 800px;
    background-color: #f8f8f8;
    margin: 0 auto;
    border: 1px solid rgba(66, 185, 131, 0.4);
    border-radius: 10px;
  }
}
</style>
